#加后缀
A = a b c
B = $(foreach f, $(A), $(f).o)
#取出带/的值
C = a b c d/
D = $(filter %/, $(C))
#与上相反
E = $(filter-out %/, $(C))
#取出符合*.c的值
files = $(wildcard *.c)
#在file1中取出其中存在的文件夹
file1 = a.c function.c abc
file2 = $(wildcard $(file1))
#将%.c替换为%.d 不符合格式不替换
dep_files = $(patsubst %.c, %.d, $(file1))
all:
	@echo B = $(B)
	@echo D = $(D)
	@echo E = $(E)
	@echo files = $(files)
	@echo file2 = $(file2)
	@echo dep_files = $(dep_files)
